<template>
  <el-table :data="tableData" border style="width: 100%">
    <el-table-column prop="company_name" label="公司名称" />
    <el-table-column prop="score" label="评分" width="60" />
    <el-table-column prop="query_time" label="查询时间" />
    <el-table-column fixed="right" label="操作" width="140">
      <template #default>
        <el-button type="text" @click="handleClick">删除</el-button>
        <el-button type="text">查看</el-button>
      </template>
    </el-table-column>
  </el-table>
  <el-pagination
    v-model:currentPage="pagination.currentPage"
    :page-size="pagination.pageSize"
    layout="total, prev, pager, next, jumper"
    :total="pagination.total"
    @current-change="handleCurrentChange"
  >
  </el-pagination>
</template>
<script setup lang="ts">
  const emit = defineEmits({
    changeCurrent: null
  })
  defineProps(['tableData', 'pagination'])
  const handleCurrentChange = (value: number) => {
    emit('changeCurrent', value)
  }
  const handleClick = () => {}
</script>
